/*
+--------------------------------------------------------------------------
|   Mblog [#RELEASE_VERSION#]
|   ========================================
|   Copyright (c) 2014, 2015 mtons. All Rights Reserved
|   http://www.mtons.com
|
+---------------------------------------------------------------------------
*/
package mblog.core.data;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class User implements Serializable {
	private static final long serialVersionUID = 107193816173103116L;

	private long id;
	private String username;

	@JSONField(serialize = false)
	private String password;
	private String avatar;
	private String name;
	private String email;
	private String mobile;

	/**
	 * cwftalus start
	 */
	private String address;//用户住处 地址
	private String province;// VARCHAR(20) NULL COMMENT '省份信息';
	private String city;// VARCHAR(20) NULL COMMENT '市信息';
	private String location;// VARCHAR(20) NULL COMMENT '县或区信息';
	/**
	 * cwftalus start
	 */

	private int posts; // 文章数
	private int comments; // 发布评论数
	private int follows; // 关注人数
	private int fans; // 粉丝数
	private int favors; // 收到的喜欢数

	private Date created;
	private int source; // 用户来源，主要用于第三方注册用户

	private Date lastLogin;
	private String signature; // 个性签名

	private int status;
	private int activeEmail;

	private List<Role> roles = new ArrayList<Role>();

}
